home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tricks of the Mac Game Programming Gurus
/
TricksOfTheMacGameProgrammingGurus.iso
/
More Source
/
Pascal
/
OneTest
/
StdHandlerStubs.p
< prev
Wrap
Text File
|
1994-10-29
|
2KB
|
62 lines
{Mostly empty stubs for OneEvents. See OneEvents.p for comments. This file is where most of your}
{window/menu/event handling code goes.}
unit StdHandlerStubs;
interface
{$ifc undefined THINK_PASCAL}
uses
Types, QuickDraw, Events, Windows, Dialogs, Fonts, DiskInit, TextEdit, Traps, Desk, Memory,{}
SegLoad, Scrap, ToolUtils, OSEvents, OSUtils, Menus, Resources, StandardFile, GestaltEqu, Files,{}
Errors; {}
{$endc}
procedure DoUpdate (w: WindowPtr);
procedure DoClose (w: WindowPtr);
procedure DoAbout;
procedure DoMenu (menuID, item: integer);
procedure DoMouse (where: Point; mods: longint);
procedure DoKey (theChar: char; mods: longint);
var
gDone: Boolean;
gHasCQD: Boolean; {Initialized by OneInit}
implementation
procedure DoUpdate (w: WindowPtr);
begin
{Handle update events. It is up to you to identify what window it is from the Window Ptr,}
{if you have more than one window.}
MoveTo(30, 30);
DrawString('No features,');
MoveTo(30, 50);
DrawString('no crash.');
end;
procedure DoClose (w: WindowPtr);
begin
{Click in close box of a window.}
gDone := true;
end;
procedure DoAbout;
begin
{Show the about box here.}
end;
procedure DoMenu (menuID, item: integer);
begin
{We have only one menu, with only one item, and that is Quit!}
{Usually, this procedure should use case for each menu, and then case}
{for each item.}
gDone := true;
end;
procedure DoMouse (where: Point; mods: longint);
begin
{Handle mouse downs in window contents.}
end;
procedure DoKey (theChar: char; mods: longint);
begin
{Handle key downs.}
end;
end.